package com.hgyc.mom.common.enums;

/**
 * 通用单据状态字典类
 * 自动生成的枚举类，请勿手动修改

 * @author fwj
 * @date 2025-05-15 14:36:17
 * @version 1.0
 **/
public enum CommonOrderStatusEnum {
    PREPARE("PREPARE", "草稿"),
    CONFIRMED("CONFIRMED", "已确认"),
    APPROVING("APPROVING", "审批中"),
    APPROVED("APPROVED", "已审批"),
    FINISHED("FINISHED", "已完成"),
    VOID("VOID", "作废")
    ;

    private final String value;
    private final String label;

    CommonOrderStatusEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public String getValue() {
        return this.value;
    }

    public String getLabel() {
        return this.label;
    }

    public static CommonOrderStatusEnum of(String value) {
        if (value == null) {
            return null;
        }
        for (CommonOrderStatusEnum item : CommonOrderStatusEnum.values()) {
            if (item.value.equals(value)) {
                return item;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.label;
    }
}
